
import React, { PureComponent } from 'react';
import qs from "query-string";

export default class Detail extends PureComponent {

  constructor(props){
    super(props);
    this.props = props;
    this.state = {
      obj:qs.parse(this.props.location.search)
    }

    // let obj = qs.parse(this.props.location.search);
    // console.log("obj",obj);
  }
    
  render() {
    return (
        <>
            <div>Detail</div>
            <p>this.props.location.search:{this.props.location.search}</p>
            <p>this.state.obj.id:{this.state.obj.id}</p>
            <p>this.state.obj.brand:{this.state.obj.brand}</p>
        </>
    )
  }
}